package com.dj.mingkong.common.enums;


/**
 * 返回状态码
 *
 * @author zenglonghui
 * @date: 2020/12/23 18:36
 */
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    ERROR(500, "失败"),
    LOGIN_ERROR(201, "用户名或密码错误"),
    ACCESS_ERROR(203, "权限不足"),
    REMOTE_ERROR(204, "远程调用失败"),
    REP_ERROR(205, "重复操作"),
    EXPIRED(206, "token过期"),
    UNAUTHORIZED(207, "未授权"),
    REPETITION(2008, "账号在别处登录");

    /**
     * 返回码
     */
    private Integer code;
    /**
     * 响应信息
     */
    private String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer code() {
        return code;
    }


    public String message() {
        return message;
    }

}
